<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/views/global/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath %>">
<%@include file="/views/global/ShopInclude.jsp" %>
<link href="static/css/module/cart.css" rel="stylesheet" type="text/css">
<title>CART</title>
</head>
<body class="submitBg">
<!-- 顶部导航条  -->
<%@include file="/views/global/header.jsp" %>
<!-- 顶部导航条结束  -->

<c:set var="pageName" value="cart"></c:set>
<%@include file="/views/global/BuyerHeader.jsp" %>

<div class="form-container center font fontColorGray" style="margin-bottom: 90px;">  <!-- 表单填写部分 -->
    <form id="submitForm" class="submit-form" action="" method="post">
      <div class="cartFormTitle hrTableBorder">
      	我的购物车<span class="cartItemsCount">${totalNum }</span> 件宝贝  ITEMS IN MY CART
      </div>
      <div class="cartTable font">
      	<div class="form-group row hrThin table-head" style="letter-spacing: 1px;">
	    	<div class="col-xs-1">
	    		<input name="cartSelectAll" type="checkbox" class="checkbox selectAll" checked="checked"/>
	    	</div>
	    	<div class="col-xs-1">
	    		选择所有ALL
	    	</div>
	    	<div class="col-xs-3">
	    		宝贝名称NAME
	    	</div>
	    	<div class="col-xs-2">
	    		套餐PACKAGE
	    	</div>
	    	<div class="col-xs-1">
	    		价格PRICE
	    	</div>
	    	<div class="col-xs-2">
	    		数量NUMBER
	    	</div>
	    	<div class="col-xs-1">
	    		总价TOTAL
	    	</div>
	    	<div class="col-xs-1">
	    		操作<span class="cartoperatorimg"></span>
	    	</div>
	    </div>
	    <c:if test="${empty shopCartList }">
	    	<div class="form-group row hrThin">
	    		<div class="alert alert-danger">YOUR CART IS EMPTY!</div>
	    	</div>
	    </c:if>
	    <c:forEach var="item" items="${shopCartList }">
	     <div class="form-group row hrThin">	     
	    	<div class="col-xs-1">
	    		<input name="itemSelect" shopCartId="${item.id }" type="checkbox" class="checkbox" checked="checked"/>
	    	</div>
	    	<div class="col-xs-1">
	    		<span class="cartItemImg">
	    			<a href="item/detail?id=${item.itemId }" target="_blank"><img style="width:95px;height:100px;" src="${item.displayFileId }"/></a>
	    		</span>
	    	</div>
	    	<div class="col-xs-3" style="text-align:left;">
	    		<div class="item-info">
	    		  ${item.title }<br/>
	    		  ${item.cnName }
	    		</div>
	    	</div>
	    	<div class="col-xs-2">
	    		${item.properties }
	    	</div>
	    	<div class="col-xs-1">
	    		<span class="price">${item.price}</span>
	    	</div>
	    	<div class="col-xs-2">
	    		<ul class="quantitySlipper">
	              <li class="quantityMinus" shopCartId="${item.id }">-</li>
	              <li class="quantityInput">${item.quantity}</li>
	              <li class="quantityPlus" shopCartId="${item.id }">+</li>
	            </ul>
	    	</div>
	    	<div class="col-xs-1">
	    		${item.price * item.quantity}
	    	</div>
	    	<div class="col-xs-1">
	    		<a href="javascript:void(0)" style="color: #f78f14;border:0;" onclick="deleteCart(this, '${item.id}')">Delete</a>
	    	</div>
	    </div>
	    <div class="form-group row hrThin">
	        <div class="col-xs-10" style="height: 35px;">
	             <span class="cartItemdatetime">2015-4-2 14:35</span>
	    		 <span class="cartItemcode">商品编号 ITEM UNM:975380836760165</span>
	    		 <span class="cartItemseller">卖家 SELLER:木风 &nbsp;&nbsp;&nbsp;
	    		    <a href="javascript:void(0)" style="color: #a0a0a0;text-decoration: none;cursor: default;">联系我 CONTACT ME</a>
	    		 </span>
	        </div>
	     </div>  
	    </c:forEach>
	    <div class="form-group row hrTableBorder" style="letter-spacing: 1px;">
	    	<div class="col-xs-1">
	    		<input name="cartSelectAll2" type="checkbox" class="checkbox selectAll" checked="checked"/>
	    	</div>
	    	<div class="col-xs-1">
	    		选择所有 ALL
	    	</div>
	    	<div class="col-xs-2">
	    		<a id="selectedItemsRemove" href="javascript:void(0)" style="text-decoration: inherit;">移除 REMOVE</a>
	    	</div>
	    	<div class="col-xs-2">
	    		<a href="javascript:void(0)" style="text-decoration: inherit;">收藏 FAVORITE</a>
	    	</div>
	    	<div class="col-xs-6">
	    		<div class="pull-right">
	    			<div class="cartTotalPrice">总价(含快递费)TOTAL(LOGSITICS INCLUDE)&nbsp;
	    			<span>¥ <span id="totalPrice">${totalPrice }</span></span></div>
	    		</div>
	    	</div>
	    </div>
	    <div class="row">
	    	<input type="button" value="立即支付  PAY NOW" class="cartPayBtn"/>
	    </div>
      </div>
    </form>
  </div>


<!-- 页尾 -->
<%@include file="/views/global/AdminScripts.jsp" %>
<%@include file="/views/global/footer.jsp" %>
<!-- 页尾结束 -->
  
</body>

<script type="text/javascript" src="static/javascript/module/CartCommon.js"></script>
<script type="text/javascript" src="static/javascript/page/cart.js"></script>
</html>
